package com.correo.vista.client.windows.ventanasInternas;
import java.sql.SQLException;
import java.util.List;

import javax.swing.JInternalFrame;

import com.correo.database.beans.ConsultaMailBean;
import com.correo.database.beans.MailBean;
import com.correo.modelo.client.ModelClient;
import com.correo.vista.client.windows.Correo;
import com.correo.vista.client.windows.componentes.menu.ItemMenuDinamicos;

//XXX: Note: setVisible(true) has a different implementation than
//XXX: show().  This seems highly bogus -- the setVisible(true)
//XXX: method was supposed to replace show() -- not add another
//XXX: method.
public class InternalFrameImpl extends JInternalFrame {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	static int 								openFrameCount = 0;
    static final int 						xOffset = 30, yOffset = 30;
    protected static ModelClient			model;
    protected ItemMenuDinamicos 			itemMenu;
    protected Correo 							correo;
    public InternalFrameImpl(String titulo,boolean resizable,boolean closable,
    						boolean maximizable,boolean iconifiable) {
        super(titulo, //titulo de la ventana
              resizable, //resizable
              closable, //closable
              maximizable, //maximizable
              iconifiable);//iconifiable
        
        //...Create the GUI and put it in the window...
        //...Then set the window size or call pack...
        setSize(300,300);

        //Set the window's location.
        setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
        ++openFrameCount;
        //setVisible(true);
        
    }
    public ItemMenuDinamicos getItemMenu() {
		return itemMenu;
	}
	public void setItemMenu(ItemMenuDinamicos itemMenu) {
		this.itemMenu = itemMenu;
	}
	public ModelClient getModel() {
		return model;
	}
//	public void setModel(ModelClient model) {
//		this.model = model;
//	}
	public void setDatoSelecionado() {
		// TODO Auto-generated method stub
		
	}
	public void inicializarVentana(Correo correo) throws ClassNotFoundException, SQLException{
		this.correo=correo;
	}
	public Correo getCorreo() {
		return correo;
	}
	public void setCorreo(Correo correo) {
		this.correo = correo;
	}
	public void setModelClient(ModelClient modelClient) {
		this.model = modelClient;
		
	}
	public MailBean getDataSelection() {
		// TODO Auto-generated method stub
		return null;
	}
	public int isTablaSelection() {
		// TODO Auto-generated method stub
		return 0;
	}
	public void setMailRecibido(List<MailBean> mensajesRecibidos) {
		
	}
	public ConsultaMailBean getConsultaMail() {
		// TODO Auto-generated method stub
		return null;
	}
}
